object dm: Tdm
  OldCreateOrder = False
  OnCreate = DataModuleCreate
  Left = 165
  Top = 209
  Height = 427
  Width = 861
  object sdsPallet: TSQLDataSet
    CommandText = 
      'select PALLETID, DESCRICAO, STATUS from L_PALLET WHERE STATUS = ' +
      #39'A'#39
    MaxBlobSize = -1
    Params = <>
    SQLConnection = SQLConnection1
    Left = 16
    Top = 56
    object sdsPalletPALLETID: TBCDField
      FieldName = 'PALLETID'
      Required = True
      Precision = 8
      Size = 0
    end
    object sdsPalletDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Required = True
      Size = 40
    end
    object sdsPalletSTATUS: TStringField
      FieldName = 'STATUS'
      FixedChar = True
      Size = 1
    end
  end
  object dspPallet: TDataSetProvider
    DataSet = sdsPallet
    Options = [poAllowCommandText]
    Left = 48
    Top = 56
  end
  object cdsPallet: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspPallet'
    Left = 80
    Top = 56
    object cdsPalletDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Required = True
      Size = 40
    end
    object cdsPalletSTATUS: TStringField
      FieldName = 'STATUS'
      FixedChar = True
      Size = 1
    end
    object cdsPalletPALLETID: TBCDField
      FieldName = 'PALLETID'
      Required = True
      Precision = 8
      Size = 0
    end
  end
  object dsPallet: TDataSource
    DataSet = cdsPallet
    Left = 112
    Top = 56
  end
  object sdsEmpresa: TSQLDataSet
    CommandText = 
      'SELECT DISTINCT CLIENTE, RAZAO_SOCIAL FROM L_BASEPL WHERE STATUS' +
      ' LIKE '#39'P%'#39'  '
    MaxBlobSize = -1
    Params = <>
    SQLConnection = SQLConnection1
    Left = 16
    Top = 112
  end
  object dspEmpresa: TDataSetProvider
    DataSet = sdsEmpresa
    Options = [poAllowCommandText]
    Left = 56
    Top = 112
  end
  object cdsEmpresa: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftString
        Name = 'PCLI'
        ParamType = ptInput
      end>
    ProviderName = 'dspEmpresa'
    Left = 88
    Top = 112
    object cdsEmpresaCLIENTE: TStringField
      FieldName = 'CLIENTE'
      Size = 5
    end
    object cdsEmpresaRAZAO_SOCIAL: TStringField
      FieldName = 'RAZAO_SOCIAL'
      Required = True
      Size = 60
    end
  end
  object dsEmpresa: TDataSource
    DataSet = cdsEmpresa
    Left = 120
    Top = 112
  end
  object sdsUser: TSQLDataSet
    CommandText = 
      'SELECT DISTINCT F_USERS.* , PFU_CODFUN FROM F_USERS, A_FUNCAO, '#13 +
      #10'(  '#13#10#13#10'  SELECT * FROM A_PERFIL_FUNCAO, A_PERFIL_USERS'#13#10' WHERE ' +
      'PUS_CODPFL = PFU_CODPFL'#13#10')  '#13#10'WHERE  USU_LOGUSU = :user '#13#10'AND US' +
      'U_LOGUSU = PUS_CODUSR(+)'#13#10'AND (( PFU_CODPFL IS NOT NULL) OR (USU' +
      '_TIPUSU = '#39'M'#39' ))'#13#10'AND USU_STATUS = '#39'A'#39
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftString
        Name = 'user'
        ParamType = ptInput
      end>
    SQLConnection = SQLConnection1
    Left = 184
    Top = 144
    object sdsUserUSU_LOGUSU: TStringField
      FieldName = 'USU_LOGUSU'
      Required = True
    end
    object sdsUserUSU_CODSUP: TStringField
      FieldName = 'USU_CODSUP'
    end
    object sdsUserUSU_NOMUSU: TStringField
      FieldName = 'USU_NOMUSU'
      Size = 40
    end
    object sdsUserUSU_NUMUSU: TStringField
      FieldName = 'USU_NUMUSU'
      Size = 10
    end
    object sdsUserUSU_UCARGO: TStringField
      FieldName = 'USU_UCARGO'
      Size = 30
    end
    object sdsUserUSU_STATUS: TStringField
      FieldName = 'USU_STATUS'
      Required = True
      Size = 1
    end
    object sdsUserUSU_KEYPAS: TStringField
      FieldName = 'USU_KEYPAS'
    end
    object sdsUserUSU_TIPUSU: TStringField
      FieldName = 'USU_TIPUSU'
      Required = True
      Size = 1
    end
    object sdsUserUSU_LANBLQ: TBCDField
      FieldName = 'USU_LANBLQ'
      Precision = 1
      Size = 0
    end
    object sdsUserUSU_ALTPAS: TBCDField
      FieldName = 'USU_ALTPAS'
      Precision = 4
      Size = 0
    end
    object sdsUserUSU_DATPAS: TSQLTimeStampField
      FieldName = 'USU_DATPAS'
    end
    object sdsUserUSU_DATEXP: TSQLTimeStampField
      FieldName = 'USU_DATEXP'
    end
    object sdsUserUSU_E_MAIL: TStringField
      FieldName = 'USU_E_MAIL'
      Size = 60
    end
    object sdsUserUSU_NUMTEL: TStringField
      FieldName = 'USU_NUMTEL'
    end
    object sdsUserUSU_NRAMAL: TStringField
      FieldName = 'USU_NRAMAL'
    end
    object sdsUserUSU_APELID: TStringField
      FieldName = 'USU_APELID'
    end
    object sdsUserUSU_MAXSOL: TFMTBCDField
      FieldName = 'USU_MAXSOL'
      Precision = 32
      Size = 8
    end
    object sdsUserUSU_MAXPED: TFMTBCDField
      FieldName = 'USU_MAXPED'
      Precision = 32
      Size = 8
    end
    object sdsUserUSU_TIPOPV: TBCDField
      FieldName = 'USU_TIPOPV'
      Precision = 1
      Size = 0
    end
    object sdsUserUSU_BLQCOM: TStringField
      FieldName = 'USU_BLQCOM'
      Size = 1
    end
    object sdsUserUSU_PVMETO: TFMTBCDField
      FieldName = 'USU_PVMETO'
      Precision = 32
      Size = 8
    end
    object sdsUserUSU_EXILOG: TStringField
      FieldName = 'USU_EXILOG'
      Required = True
    end
    object sdsUserPFU_CODFUN: TBCDField
      FieldName = 'PFU_CODFUN'
      Required = True
      Precision = 5
      Size = 0
    end
  end
  object cdsUser: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftString
        Name = 'user'
        ParamType = ptInput
      end>
    ProviderName = 'dspUser'
    Left = 296
    Top = 144
    object cdsUserUSU_LOGUSU: TStringField
      FieldName = 'USU_LOGUSU'
      Required = True
    end
    object cdsUserUSU_CODSUP: TStringField
      FieldName = 'USU_CODSUP'
    end
    object cdsUserUSU_NOMUSU: TStringField
      FieldName = 'USU_NOMUSU'
      Size = 40
    end
    object cdsUserUSU_NUMUSU: TStringField
      FieldName = 'USU_NUMUSU'
      Size = 10
    end
    object cdsUserUSU_UCARGO: TStringField
      FieldName = 'USU_UCARGO'
      Size = 30
    end
    object cdsUserUSU_STATUS: TStringField
      FieldName = 'USU_STATUS'
      Required = True
      Size = 1
    end
    object cdsUserUSU_KEYPAS: TStringField
      FieldName = 'USU_KEYPAS'
    end
    object cdsUserUSU_TIPUSU: TStringField
      FieldName = 'USU_TIPUSU'
      Required = True
      Size = 1
    end
    object cdsUserUSU_LANBLQ: TBCDField
      FieldName = 'USU_LANBLQ'
      Precision = 1
      Size = 0
    end
    object cdsUserUSU_ALTPAS: TBCDField
      FieldName = 'USU_ALTPAS'
      Precision = 4
      Size = 0
    end
    object cdsUserUSU_DATPAS: TSQLTimeStampField
      FieldName = 'USU_DATPAS'
    end
    object cdsUserUSU_DATEXP: TSQLTimeStampField
      FieldName = 'USU_DATEXP'
    end
    object cdsUserUSU_E_MAIL: TStringField
      FieldName = 'USU_E_MAIL'
      Size = 60
    end
    object cdsUserUSU_NUMTEL: TStringField
      FieldName = 'USU_NUMTEL'
    end
    object cdsUserUSU_NRAMAL: TStringField
      FieldName = 'USU_NRAMAL'
    end
    object cdsUserUSU_APELID: TStringField
      FieldName = 'USU_APELID'
    end
    object cdsUserUSU_MAXSOL: TFMTBCDField
      FieldName = 'USU_MAXSOL'
      Precision = 32
      Size = 8
    end
    object cdsUserUSU_MAXPED: TFMTBCDField
      FieldName = 'USU_MAXPED'
      Precision = 32
      Size = 8
    end
    object cdsUserUSU_TIPOPV: TBCDField
      FieldName = 'USU_TIPOPV'
      Precision = 1
      Size = 0
    end
    object cdsUserUSU_BLQCOM: TStringField
      FieldName = 'USU_BLQCOM'
      Size = 1
    end
    object cdsUserUSU_PVMETO: TFMTBCDField
      FieldName = 'USU_PVMETO'
      Precision = 32
      Size = 8
    end
    object cdsUserUSU_EXILOG: TStringField
      FieldName = 'USU_EXILOG'
      Required = True
    end
    object cdsUserPFU_CODFUN: TBCDField
      FieldName = 'PFU_CODFUN'
      Required = True
      Precision = 5
      Size = 0
    end
  end
  object dspUser: TDataSetProvider
    DataSet = sdsUser
    Left = 240
    Top = 144
  end
  object dsUser: TDataSource
    DataSet = sdsUser
    Left = 344
    Top = 144
  end
  object sdsPack: TSQLDataSet
    MaxBlobSize = -1
    Params = <>
    SQLConnection = SQLConnection1
    Left = 200
    Top = 48
  end
  object dspPack: TDataSetProvider
    DataSet = sdsPack
    Options = [poAllowCommandText]
    Left = 232
    Top = 48
  end
  object cdsPack: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspPack'
    Left = 264
    Top = 48
  end
  object sdsEmb: TSQLDataSet
    CommandText = 'Select PACKEMB_ID, PACKEMB_DESC, TPE_CODIGO FROM L_PACKEMB'
    MaxBlobSize = -1
    Params = <>
    SQLConnection = SQLConnection1
    Left = 168
  end
  object dspEmb: TDataSetProvider
    DataSet = sdsEmb
    Left = 208
  end
  object cdsEmb: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspEmb'
    Left = 248
    object cdsEmbPACKEMB_ID: TStringField
      FieldName = 'PACKEMB_ID'
      Size = 30
    end
    object cdsEmbPACKEMB_DESC: TStringField
      FieldName = 'PACKEMB_DESC'
      Size = 80
    end
    object cdsEmbTPE_CODIGO: TBCDField
      FieldName = 'TPE_CODIGO'
      Precision = 5
      Size = 0
    end
  end
  object QPesq: TQuery
    DatabaseName = 'orcl'
    SQL.Strings = (
      'SELECT * FROM ATS_OF')
    Left = 208
    Top = 97
    object QPesqFANTASMA: TStringField
      DisplayLabel = 'F'
      DisplayWidth = 3
      FieldName = 'FANTASMA'
      Size = 1
    end
    object QPesqPRODUTO: TStringField
      DisplayLabel = 'Produto'
      DisplayWidth = 22
      FieldName = 'PRODUTO'
      Size = 26
    end
    object QPesqSEQ: TFloatField
      DisplayLabel = 'Seq,'
      DisplayWidth = 3
      FieldName = 'SEQ'
    end
    object QPesqDESCRICAO_CCUSTO: TStringField
      DisplayLabel = 'C.Custo'
      DisplayWidth = 20
      FieldName = 'DESCRICAO_CCUSTO'
      Size = 40
    end
    object QPesqTAREFA: TStringField
      DisplayLabel = 'Tarefa'
      DisplayWidth = 30
      FieldName = 'TAREFA'
      Size = 100
    end
    object QPesqPROGRAMADO: TFloatField
      DisplayLabel = 'Programado'
      DisplayWidth = 10
      FieldName = 'PROGRAMADO'
    end
    object QPesqPRODUZIDO: TFloatField
      DisplayLabel = 'Produzido'
      DisplayWidth = 10
      FieldName = 'PRODUZIDO'
    end
    object QPesqSALDO: TFloatField
      DisplayLabel = 'Sld. Produzir'
      DisplayWidth = 10
      FieldName = 'SALDO'
    end
    object QPesqSALDO_TERCEIRO: TFloatField
      DisplayLabel = 'Sld. Terceiro'
      DisplayWidth = 10
      FieldName = 'SALDO_TERCEIRO'
    end
    object QPesqSALDO_IRBAS: TFloatField
      DisplayLabel = 'Sld. Irbas'
      DisplayWidth = 10
      FieldName = 'SALDO_IRBAS'
    end
    object QPesqCOD_OF: TStringField
      DisplayLabel = 'O.F.'
      DisplayWidth = 20
      FieldName = 'COD_OF'
      Size = 60
    end
    object QPesqINSTRUCAO: TMemoField
      DisplayWidth = 10
      FieldName = 'INSTRUCAO'
      Visible = False
      BlobType = ftMemo
      Size = 1
    end
    object QPesqCCUSTO: TFloatField
      DisplayWidth = 10
      FieldName = 'CCUSTO'
      Visible = False
    end
    object QPesqDESCRICAO: TStringField
      DisplayWidth = 100
      FieldName = 'DESCRICAO'
      Visible = False
      Size = 100
    end
    object QPesqPROD: TStringField
      DisplayWidth = 129
      FieldName = 'PROD'
      Visible = False
      Size = 129
    end
  end
  object sdsEtiqueta: TSQLDataSet
    GetMetadata = False
    CommandText = 
      'SELECT  ETI_CODETI, ETI_QTDENV, ETI_CODPRO, ETI_LOTE,  DOF_CODIO' +
      'F, DOF_CODIGO, ETI_DATETI , substr(PRO_DESCRI, 0,37) PRO_DESCRI ' +
      ' , substr(PRO_DESCRI, 0,60) PRO_DESCRI1, DOF_DATDOF, DOF_CODTUR,' +
      ' PRO_COMP03  '#13#10' FROM F_ETIQUETAS, F_PRODS, ATS_DETOF '#13#10'WHERE ETI' +
      '_CODPRO = PRO_CODPRO AND ETI_COMP19 = DOF_CODIGO AND DOF_CODIGO ' +
      '= :pOF  AND ETI_IMPRES = 0'
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftFMTBcd
        Name = 'pOF'
        ParamType = ptInput
      end>
    SQLConnection = SQLConnection1
    Left = 16
    Top = 216
    object sdsEtiquetaETI_CODETI: TStringField
      FieldName = 'ETI_CODETI'
      Required = True
      Size = 10
    end
    object sdsEtiquetaETI_QTDENV: TFMTBCDField
      FieldName = 'ETI_QTDENV'
      Precision = 32
      Size = 8
    end
    object sdsEtiquetaETI_CODPRO: TStringField
      FieldName = 'ETI_CODPRO'
      Size = 26
    end
    object sdsEtiquetaETI_LOTE: TFMTBCDField
      FieldName = 'ETI_LOTE'
      Precision = 32
      Size = 8
    end
    object sdsEtiquetaDOF_CODIOF: TStringField
      FieldName = 'DOF_CODIOF'
      Required = True
      Size = 60
    end
    object sdsEtiquetaDOF_CODIGO: TFMTBCDField
      FieldName = 'DOF_CODIGO'
      Required = True
      Precision = 32
      Size = 8
    end
    object sdsEtiquetaETI_DATETI: TSQLTimeStampField
      FieldName = 'ETI_DATETI'
      Required = True
    end
    object sdsEtiquetaPRO_DESCRI: TStringField
      FieldName = 'PRO_DESCRI'
      Required = True
      Size = 100
    end
    object sdsEtiquetaPRO_DESCRI1: TStringField
      FieldName = 'PRO_DESCRI1'
      Size = 63
    end
    object sdsEtiquetaDOF_DATDOF: TSQLTimeStampField
      FieldName = 'DOF_DATDOF'
      Required = True
    end
    object sdsEtiquetaDOF_CODTUR: TBCDField
      FieldName = 'DOF_CODTUR'
      Required = True
      Precision = 1
      Size = 0
    end
    object sdsEtiquetaPRO_COMP03: TStringField
      FieldName = 'PRO_COMP03'
      Size = 80
    end
  end
  object dspEtiqueta: TDataSetProvider
    DataSet = sdsEtiqueta
    Options = [poAllowCommandText]
    Left = 72
    Top = 216
  end
  object cdsEtiqueta: TClientDataSet
    Aggregates = <>
    FetchOnDemand = False
    Params = <
      item
        DataType = ftFMTBcd
        Name = 'pOF'
        ParamType = ptInput
      end>
    ProviderName = 'dspEtiqueta'
    Left = 128
    Top = 216
    object cdsEtiquetaETI_CODETI: TStringField
      FieldName = 'ETI_CODETI'
      Required = True
      Size = 10
    end
    object cdsEtiquetaETI_QTDENV: TFMTBCDField
      FieldName = 'ETI_QTDENV'
      Precision = 32
      Size = 8
    end
    object cdsEtiquetaETI_CODPRO: TStringField
      FieldName = 'ETI_CODPRO'
      Size = 26
    end
    object cdsEtiquetaETI_LOTE: TFMTBCDField
      FieldName = 'ETI_LOTE'
      Precision = 32
      Size = 8
    end
    object cdsEtiquetaDOF_CODIOF: TStringField
      FieldName = 'DOF_CODIOF'
      Required = True
      Size = 60
    end
    object cdsEtiquetaDOF_CODIGO: TFMTBCDField
      FieldName = 'DOF_CODIGO'
      Required = True
      Precision = 32
      Size = 8
    end
    object cdsEtiquetaETI_DATETI: TSQLTimeStampField
      FieldName = 'ETI_DATETI'
      Required = True
    end
    object cdsEtiquetaPRO_DESCRI: TStringField
      FieldName = 'PRO_DESCRI'
      Required = True
      Size = 100
    end
    object cdsEtiquetaPRO_DESCRI1: TStringField
      FieldName = 'PRO_DESCRI1'
      Size = 63
    end
    object cdsEtiquetaDOF_DATDOF: TSQLTimeStampField
      FieldName = 'DOF_DATDOF'
      Required = True
    end
    object cdsEtiquetaDOF_CODTUR: TBCDField
      FieldName = 'DOF_CODTUR'
      Required = True
      Precision = 1
      Size = 0
    end
    object cdsEtiquetaPRO_COMP03: TStringField
      FieldName = 'PRO_COMP03'
      Size = 80
    end
  end
  object dsEtiqueta: TDataSource
    DataSet = cdsEtiqueta
    Left = 184
    Top = 216
  end
  object sdsBusca: TSQLDataSet
    MaxBlobSize = -1
    Params = <>
    SQLConnection = SQLConnection1
    Left = 264
    Top = 216
  end
  object dspBusca: TDataSetProvider
    DataSet = sdsBusca
    Options = [poAllowCommandText]
    Left = 328
    Top = 208
  end
  object cdsBusca: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspBusca'
    Left = 392
    Top = 216
  end
  object sProcLog: TSQLStoredProc
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftString
        Name = 'CODETI'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'LOGUSU'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'HISTOR'
        ParamType = ptInput
      end>
    SQLConnection = SQLConnection1
    StoredProcName = 'ATS_GERALOGETIQ'
    Left = 344
    Top = 40
  end
  object sProcRefugo: TSQLStoredProc
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftString
        Name = 'COFDET1'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'CODPRO'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'QTDREF1'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'MOTREF1'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'USUARIO'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'CODSEQ'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'COLETOR'
        ParamType = ptInput
      end>
    SQLConnection = SQLConnection1
    StoredProcName = 'ATS_APONTA_REFUGO'
    Left = 408
    Top = 40
  end
  object SQLConnection1: TSQLConnection
    ConnectionName = 'ORACLE_ATS'
    DriverName = 'Oracle'
    GetDriverFunc = 'getSQLDriverORACLE'
    KeepConnection = False
    LibraryName = 'dbexpora.dll'
    LoginPrompt = False
    Params.Strings = (
      'DriverName=Oracle'
      'BlobSize=-1'
      'DataBase=orcl'
      'ErrorResourceFile='
      'LocaleCode=0000'
      'Password=LARANJA'
      'Oracle TransIsolation=ReadCommited'
      'User_Name=REFLECT')
    VendorLib = 'OCI.DLL'
    Left = 104
    Top = 8
  end
  object spEtiq_NQTDE: TSQLStoredProc
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftString
        Name = 'OLDETIQ'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'USUARIO'
        ParamType = ptInput
      end
      item
        DataType = ftBCD
        Name = 'QTDTOT'
        ParamType = ptInput
      end
      item
        DataType = ftBCD
        Name = 'QTDEMB'
        ParamType = ptInput
      end>
    SQLConnection = SQLConnection1
    StoredProcName = 'ATS_ETIQ_NQTDE'
    Left = 400
    Top = 96
  end
  object sqlBusca: TSQLQuery
    MaxBlobSize = -1
    Params = <>
    SQLConnection = SQLConnection1
    Left = 536
    Top = 120
  end
end
